# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=smuggler-py
pkgver=1.0
pkgrel=8
pkgdesc='Python tool used to test for HTTP Desync/Request Smuggling attacks.'
arch=('any')
groups=('blackarch' 'blackarch-webapp' 'blackarch-scanner')
url='https://github.com/gwen001/pentest-tools/blob/master/smuggler.py'
license=('custom:IDBIL')
depends=('python' 'python-argparse' 'python-requests' 'python-colored')
makedepends=('git')
source=("$pkgname::git+https://github.com/gwen001/pentest-tools.git")
sha512sums=('SKIP')

prepare() {
  cd $pkgname

  sed -ri 's|python3.5|python|' "smuggler.py"
}

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/bin"

  install -Dm 755 -t "$pkgdir/usr/share/$pkgname/" smuggler.py

  ln -s "/usr/share/$pkgname/smuggler.py" "$pkgdir/usr/bin/$pkgname"
}

